<template>
    <div class = "myInfo">
        <div class = "header">
            <router-link to="/home/home_index" class = "backspace iconfont icon-leftArr"></router-link>我的
        </div>
        <router-link to = "/login" v-if="!uname" >
            <div class = "profile noUser">
                <div class="profileInfo clearfix">
                    <div class="userHeader">
                        <img src="static/img/userDefaultHeader.png" alt="">
                    </div>
                    <div class="info">
                        <p class="uname">登录/注册</p>
                        <p class="tel">登录后享受更多特权</p>
                    </div>-
                    <span class = "arrowEnter iconfont icon-rightArr"></span>
                </div>
            </div>
        </router-link>
        <router-link to = "/accountInfo" v-else>
            <div class = "profile">
                <div class="profileInfo clearfix">
                    <div class="userHeader">

                    </div>
                    <div class="info">
                        <p class="unama">{{uname}}</p>
                        <p class="tel">159****9329</p>
                    </div>
                    <span class = "arrowEnter iconfont icon-rightArr"></span>
                </div>
            </div>
        </router-link>
        <div class = "moneyWrap">
            <div class="moneyitem wallet">
                <p v-if="uname==false"  class = "icon_moneyitem">
                    <span class = "iconfont icon-wallet"></span>
                </p>
                <p v-else>
                    <span>0.00</span>
                    <span>元</span>
                </p>
                <p>钱包</p>
            </div>
            <div class="moneyitem redBag">
                 <p v-if="uname==false" class = "icon_moneyitem">
                    <span class = "iconfont icon-redPocket"></span>
                </p>
                <p v-else>
                    <span>0</span>
                    <span>个</span>
                </p>
                <p>红包</p>
            </div>
            <div class="moneyitem goldCoin">
                 <p v-if="uname==false"  class = "icon_moneyitem">
                    <span class = "iconfont icon-money"></span>
                </p>
                <p v-else>
                    <span>0</span>
                    <span>个</span>
                </p>
                <p>金币</p>
            </div>
        </div>
        <section class = "profile_line">
            <a>
              <span class = "iconLeft iconfont icon-locate"></span>
              <div class = "myAddr">
                  我的地址
              </div>
              <span class = "iconarrow iconfont icon-rightArr
"></span>
            </a>
        </section>
        <section class = "profile_line">
             <a>
              <span class = "iconLeft iconfont icon-market"></span>
              <div class = "goldCity">
                  金币商城
              </div>
              <span class = "iconarrow iconfont icon-rightArr"></span>
            </a>
            <a>
              <span class = "iconLeft iconfont icon-share"></span>
              <div class = "share">
                  分享拿十元美金
              </div>
                <span class = "iconarrow iconfont icon-rightArr
"></span>
            </a>
        </section>
        <section class = "profile_line">
            <a>
              <span class = "iconLeft iconfont icon-service"></span>
              <div class = "customerService ">
                  我的客服
              </div>
                <span class = "iconarrow iconfont icon-rightArr
"></span>
            </a>
            <a>
              <span class = "iconLeft iconfont icon-eleme"></span>
              <div class = "download">
                  下载饿了么APP
              </div>
                <span class = "iconarrow iconfont icon-rightArr
"></span>
            </a>
        </section>
    </div>
</template>
<script>
    import "../../static/css/myInfo.css"
    import "../../static/css/reset.css"
    import "../../static/lib/font/iconfont.css"
    export default {
        data(){
            return {
                uname:""
            }
        },
        mounted(){
            this.uname = localStorage.getItem('uname');
            console.log(!this.uname);
        }
    }
</script>
<style lang="scss">
    .icon-leftArr {
        color: white;
        font-size: .2rem;
        font-weight: bold;
      }
</style>
